i = 8
an = 1393
bn = 985
count = 1
while i < 1000:
    an1 = 2 * bn + an
    bn1 = an + bn
    if len(str(an1)) > len(str(bn1)):
        count += 1
    an = an1
    bn = bn1
    i += 1
print(count)
